<?php
$scriptname	= strtolower($_SERVER['PHP_SELF']);
$scheme		= $_SERVER['SERVER_PORT'] == "80" ? "http:" : "https:";
$host		= $_SERVER['HTTP_HOST'];
$script		= str_replace("/index.php", "", $scriptname);
$script		= str_replace("/admin", "", $scriptname);
$script		= 'index.php?page=System.Login';
$url		= $scheme . '//' . $host . '/' . $script;

if (!headers_sent())
{
	header("Location:  $url");
	exit();
}
else
{
	echo '<script type="text/javascript">';
	echo 'window.location.href="'.$url.'";';
	echo '</script>';
	echo '<noscript>';
	echo '<meta http-equiv="refresh" content="0;url='.$url.'" />';
	echo '</noscript>';
}
?>